package cn.txy.article.service;

import cn.txy.article.bo.ArticleTypeCountBo;
import cn.txy.article.domain.*;
import cn.txy.article.query.ArticleQuery;
import cn.txy.base.service.BaseService;
import com.github.pagehelper.PageInfo;
import org.springframework.cache.annotation.Cacheable;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

public interface ArticleService extends BaseService<Article> {
    void add(Article article);

    List<Article> queryPage(ArticleQuery query);

    List<Article> selectPage(ArticleQuery articleQuery);

    Integer star(HttpServletRequest request,Long id);

    List<ArticleTypeCountBo> articleTypeCount();

    Map<Integer, List<Article>> archives();

    List<Map<String, Object>> getTop6StarArticles();

    List<ArticleType> getTop5ArticleTypes();

    Integer read(HttpServletRequest request, Long id);

    List<YearAndMonth> findByYearAndMonth();

}
